import asyncio

from IntelligentDocumentReview.Controller.reviewController import app
from IntelligentDocumentReview.DbInit.mysqlDb import init_db
from IntelligentDocumentReview.Service.reviewService import tasklist
import _thread

if __name__ == '__main__':
    init_db()

    # asyncio.create_task(
    #     tasklist())
    # await task

    # asyncio.get_event_loop().run_until_complete(tasklist())

    try:
        _thread.start_new_thread(tasklist, ())
    except:
        print("Thread Error")

    print("Flask启动。。。。。")
    app.run(port=1001)

